import request from '@/utils/request'

export function getRetail(id) {
  return request({
    url: '/retail/get',
    params: {
      'id': id
    },
    method: 'get'
  })
}
export function listRetail(pos, size, conditions) {
  return request({
    url: '/retail/list',
    params: {
      'jsonCondition': JSON.stringify(conditions),
      'pos': pos,
      'size': size
    },
    method: 'get'
  })
}
export function delRetail(retailmodel) {
  return request({
    url: '/retail/del',
    data: retailmodel,
    method: 'post'
  })
}
export function delRetails(jsonRetailModel) {
  return request({
    url: '/retail/bulkdel',
    data: {
      data: jsonRetailModel
    },
    method: 'post'
  })
}
export function setRetail(retailmodel) {
  return request({
    url: '/retail/set',
    data: retailmodel,
    method: 'post'
  })
}
export function listMember(id) {
  return request({
    url: '/retail/listmember',
    params: {
      'id': id
    },
    method: 'get'
  })
}
export function setMember(retailid, jsonmember) {
  return request({
    url: '/retail/setmember',
    data: {
      retail: retailid,
      jsonRetailMemberModel: jsonmember
    },
    method: 'post'
  })
}
